Line Graphs#
Several children were asked how many TV shows they watch each day. The results are shown in the table below. The results are shown in the table below
Please open the RStudio workspace below and edit the student.R
script to complete the following task:
Please write R code that generates a line graph with the following properties:
The title of the line graph should be ‘Number of TV Shows watched each day’.
The x-axis label should be ‘Number of TV Shows’.
The y-axis label should be ‘Frequency’.
The graph style should be overplotted.
The color of the line graph should be orange.
When you are ready to test your code, click the “Grade” button.
Note: You should not need to use ggplot2
for this question, and you are not advised to do so, as it may interfere with the autograder.
Once you are satisfied with the plot your code generates, make sure the script file is saved in RStudio.
To submit your answer after saving it in RStudio, come back to this page and select “Save & Grade” or “Save only” at the bottom of the page.
Part 1#
Attribution#
Problem is from the OpenStax Introductory Statistics 2e textbook, licensed under the CC-BY 4.0 license.